import pygame
class Constants:
    """存储所有常量的类"""
    WIDTH, HEIGHT = 1000, 600               # 游戏界面长和宽
    TEXT_COLOR = (255, 255, 255)            # 白色
    HOVER_COLOR = (255, 255, 0)             # 黄色
    BUTTON_WIDTH, BUTTON_HEIGHT = 200, 50   # 按钮
    BUTTON_PADDING = 20
    CURSOR_TOGGLE_INTERVAL = 0.5
    ERROR_DISPLAY_TIME = 3                  # 错误消息提示时间
    AVATAR_SIZE = (100, 100)                # 头像大小
    FONT_SIZE = 24                          # 默认字体大小
    SMALL_FONT_SIZE = 20                    # 小字体

class TextBoxConfig:
    FONT_SIZE = 18
    LABEL_FONT_SIZE = 20
    PADDING = 10
    BORDER_WIDTH = 2
    BORDER_ACTIVE_WIDTH = 4  # 激活时边框宽度
    SCROLL_BAR_WIDTH = 15
    LINE_SPACING = 5
    BG_ALPHA = 128  # 背景透明度（0-255），这里设置为半透明
    BG_COLOR = (255, 255, 255, BG_ALPHA)  # 白色半透明背景（带alpha通道）
    BORDER_COLOR = (0, 0, 0)  # 黑色边框
    BORDER_ACTIVE_COLOR = (255,  0,  3)  # 激活时也是红色边框
    TEXT_COLOR = (0, 106, 255)
    SCROLL_BAR_COLOR = (200, 200, 200)
    THUMB_COLOR = (120, 120, 120)
    FONT_NAME = "SimHei"  # 中文黑体